Skip to main content

AddBackendServers

Description

call AddBackendServers add backend server.

Request Method

POST

Request Path

/apsara/route/Slb/AddBackendServers

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
regionIdBODYstringYesNo sample value for this parameter.region id
LoadBalancerIdBODYstringYeslb-2ze7o5h52g02kkzz****load balancing instance ID.
BackendServersBODYstringYes[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.XX.XX. 6", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.XX.XX. 6", "Port":"80","Description":"test-113" }]list of back-end servers to be added. the server list needs to contain the following parameters: ServerId:String type, required, instance ID of the backend server. It is divided into ECS instance ID or ENI instance ID. when ServerId parameter value is ENI instance ID,Type parameter value is required. Weight: The weight of the backend server. value:0~100. default value:100. Description If the value is 0, load balancing will not forward the request to the backend server. Description :String type, not required. It is 1 to 80 characters in length and can contain letters, numbers, dashes (-), forward slashes (/), half-width periods (.) and underscores (_). Chinese is supported. Type: backend server type, value: ecs(default): ECS instance eni: ENI instance ServerIp: the instance IP of ECS or ENI. The example is as follows: example of mounting ECS:[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port": "80", "Description": "test-112" }] mount ENI:[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port": "80", "Description": "test-112" }] mount ENI multi-IP:[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port": "80", "Description": "test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port": "80", "Description": "test-113" }] description the backend server instance must be running before it can be added to the load balancing instance, and a maximum of 20 backend servers can be added for each call. Only guaranteed instances can add ENI backend servers.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
ServerIdstringi-2zej4lxhjoq1icu****ECS instance ID or ENI instance ID.
Descriptionstringbackend serverbackend server description.
RequestIdstring34B82C81-F13B-4EEB-99F6-A048C67CC830request ID.
BackendServerNo sample value for this parameter.No description for this parameter.
LoadBalancerIdstringlb-2ze7o5h52g02kkzz****load balancing instance ID.
BackendServersarray of backendserverNo sample value for this parameter.backend server list.
Weightstring100the weight of the back-end server. Value:0~100 default value is 100, if the value is 0, the request will not be forwarded to the backend server.

Example

Successful Response example

{
"ServerId":"i-2zej4lxhjoq1icu****",
"Description":"backend server",
"RequestId":"34B82C81-F13B-4EEB-99F6-A048C67CC830",
"BackendServer":"",
"LoadBalancerId":"lb-2ze7o5h52g02kkzz****",
"BackendServers":"",
"Weight":"100"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}